package com.auth.manage.plugin.domain.facade;

import com.auth.manage.base.responce.SingleResponce;
import com.auth.manage.common.product.api.response.ProductInfo;
import com.auth.manage.common.product.api.service.ProductFacadeService;
import com.auth.manage.plugin.domain.service.ProductService;
import lombok.RequiredArgsConstructor;
import org.apache.dubbo.config.annotation.DubboService;

@RequiredArgsConstructor
@DubboService(version = "1.0.0")
public class ProductRpcServiceImpl implements ProductFacadeService {
    private final ProductService productService;
    @Override
    public SingleResponce<ProductInfo> getProductInfoByProductId(Long productId) {
        ProductInfo info = productService.getProductInfoByProductId(productId);
        return SingleResponce.of(info);
    }
}
